API Docs

 

 

End Point

VB.Net / ASP.net Sample

Authentication:

VRP API uses Basic Authentication

Test Credentials:

User: vrp

Password: vrp

Rights: Read Only

Note: Password is case sensitive

 

<%

 Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

 %>

Inventory

Get All Inventory

This endpoint retrieves all inventory.

 

HTTP Request

GET http://dev.visualretailplus.com/inventory

 

 Results may be filtered by any of the values returned.

Ex: http://dev.visualretailplus.com/inventory?upc=800111&StoreID=01

<%

  try

   Dim ThreadResponse = ""

   Dim PathURL As String = "http://dev.visualretailplus.com/inventory?upc=800111"

   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

   Dim rdataStream As System.IO.Stream

   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)

   request.Credentials = SiteCredentials

   request.Method = "GET"

   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)

   Dim  dataStream = rsp.GetResponseStream()

   Dim reader As New System.IO.StreamReader(dataStream)

   ThreadResponse = reader.ReadToEnd()

   reader.Close()

   dataStream.Close()

   response.write(ThreadResponse)

 catch ex as exception

     response.write(ex.message)

 end try

     response.end()

%>

The above command returns JSON structured like this:

 

{

    "results": [{

        "StoreID": "01",

        "UPC": "800111",

        "IVDesc": "Slv-less rouched top",

        "Size": "XS",

        "Color": "A006",

        "ParentItem": "",

        "UnitCost": "49.0000",

        "Averagecost": "0.0000",

        "MSRP": "187.0000",

        "SalePrice": "1000.0000",

        "OnHand": "9",

        "TagsToPrint": "0",

        "OnOrder": "0",

        "OnLayaway": "10",

        "Redlevel": "26",

        "LastUpdate": "12/18/2015 10:18:13 AM",

        "OnCustOrder": "110",

        "WSPrice": "0.0000",

        "ivLocation": "1",

        "WIL": "",

        "MaxLevel": "",

        "ProductID": "r2000c",

        "Description": "cashmere reversible zip hoodie.",

        "Scale": "XS-XL",

        "VendorID": "AO",

        "MG": "Women",

        "SG": "top",

        "SSG": "Hoodies",

        "Taxable": "1",

        "DOB": "2/23/2015",

        "TotalPurchaseToDate": "26914",

        "TotalSoldToDate": "24235",

        "LastPurchaseDate": "1/13/2020",

        "LastPurchaseQty": "30",

        "FirstSoldDate": "3/30/2015",

        "Service": "0",

        "Commission": "1",

        "PU1": "USA",

        "PU2": "",

        "PU3": "",

        "PU4": "1234",

        "Pcode": "35-Q77",

        "WilID": "",

        "Active": "1",

        "Discontinued": "0",

        "AllowDiscount": "1",

        "FinalSale": "0",

        "MixAndMatch": "",

        "VIPEligible": "1",

        "AllowFractions": "1",

        "WebProduct": "1",

        "Brand": "",

        "Season": "Summer",

        "AllowLayaway": "1",

        "AllowSpecialOrder": "1",

        "AllowCoupon": "1",

        "CustomerRequired": "0",

        "MinimumOrder": "0"

    }],

    "Rows": 1,

    "Page": 1,

    "Pages": 1

}

Gift Cards

Query a Card

HTTP Request

GET http://dev.visualretailplus.com/giftcard/{CardID}

 

Query Parameters

Parameter

Data Type

Required

Description

CardID

String

TRUE

VRP Gift Card Number

 

Data Returned

Parameter

Data Type

Description

CardID

String

VRP Gift Card Number

CardBalance

Decimal

Current Gift Card Balance

ResponseStatus

String

Transaction Result (Success\Failed)

ResponseText

String

Error Details

 

 

<%

  try

   Dim ThreadResponse = ""

   Dim PathURL As String = "http://dev.visualretailplus.com/giftcard/123"

   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

   Dim rdataStream As System.IO.Stream

   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)

   request.Credentials = SiteCredentials

   request.Method = "GET"

   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)

   Dim  dataStream = rsp.GetResponseStream()

   Dim reader As New System.IO.StreamReader(dataStream)

   ThreadResponse = reader.ReadToEnd()

   reader.Close()

   dataStream.Close()

   response.write(ThreadResponse)

 catch ex as exception

     response.write(ex.message)

 end try

     response.end()

%>

Create a Gift Card Transaction

HTTP Request

PUT http://dev.visualretailplus.com/giftcard

 

Required Properties

Name

Data Type

Required

Description

TransType

String

True

Type of transaction to create. FILL will add amount to card. Charge will reduce amount on card

CardID

String

True

Card ID to add transaction to

TransAmount

Decimal

True

Amount of transaction

ReceiptNo

Big Integer

False

Corresponding VRP receipt that transaction took place on

StoreID

String

False

VRP StoreID that the transaction took place at

 

Data Returned

Parameter

Data Type

Description

CardID

String

VRP Gift Card Number

CardBalance

Decimal

Current Gift Card Balance

ResponseStatus

String

Transaction Result (Success\Failed)

ResponseText

String

Error Details

<%

  try

   Dim ThreadResponse = ""

   Dim content as string = "{ ""TransType"":""Charge"",""CardID"":""123"",""TransAmount"":5,""ReceiptNo"":0,""StoreID"":""01""}"

   Dim PathURL As String = "http://dev.visualretailplus.com/giftcard"

   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

   Dim rdataStream As System.IO.Stream

   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)

   request.Credentials = SiteCredentials

  Dim arr As Byte() = System.Text.Encoding.UTF8.GetBytes(Content)

  request.ContentType = "application/json"

  request.ContentLength = arr.Length

  rdataStream = request.GetRequestStream()

  rdataStream.Write(arr, 0, arr.Length)

  rdataStream.Close()

 

   request.Method = "PUT"

   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)

   Dim  dataStream = rsp.GetResponseStream()

   Dim reader As New System.IO.StreamReader(dataStream)

   ThreadResponse = reader.ReadToEnd()

   reader.Close()

   dataStream.Close()

   response.write(ThreadResponse)

 catch ex as exception

     response.write(ex.message)

 end try

     response.end()

%>

The above command returns JSON structured like this:

 

{

    "CardBalance": "108.4000",

    "CardID": "123",

    "ResponseStatus": "Success",

    "ResponseText": "Transaction Completed."

}

Customer Orders

Get All Customer Orders

This endpoint retrieves all customer orders.

 

HTTP Request

GET http://dev.visualretailplus.com/orders

 

Query Parameters

 

 

Name

Data Type

Required

Description

StoreID

String

True

5 characters (or less) VRP Store Code

ReceiptNo

Big Integer

False

VRP Receipt Number

TRSDate

Decimal

False

Date of transaction

TRSTime

Big Integer

False

Time of transaction

<%

  try

   Dim ThreadResponse = ""

   Dim PathURL As String = "http://dev.visualretailplus.com/orders?ReceiptNo=12"

   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

   Dim rdataStream As System.IO.Stream

   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)

   request.Credentials = SiteCredentials

   request.Method = "GET"

   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)

   Dim  dataStream = rsp.GetResponseStream()

   Dim reader As New System.IO.StreamReader(dataStream)

   ThreadResponse = reader.ReadToEnd()

   reader.Close()

   dataStream.Close()

   response.write(ThreadResponse)

 catch ex as exception

     response.write(ex.message)

 end try

     response.end()

%>

The above command returns JSON structured like this:

 

{

    "orders": [

        {

        "StoreID": "02",

        "OrderID": "10",

        "Receiptno": "12",

        "TRSDate": "4/13/2020",

        "TRSTime": "4:16:00 PM",

        "TaxAmt": "19.8000",

        "LineItems": [{

            "Amount": "210.00",

            "Discount": "0.00",

            "LineTax": "7.80",

            "Quantity": "1.00",

            "UPC": "800005"

        }],

        "Payments": [{

            "PaymentAmount": "217.8000",

            "PaymentType": "A"

        }],

        "Customer": {

            "CustomerID": "ABCD5600",

            "FirstName": "Jeannie",

            "LastName": "Leeman",

            "EmailAddress": "Jeannie@gmail.com",

            "BillingAddress": {

                "Address1": "123 Oak Street",

                "Address2": "",

                "City": "Knoxville",

                "StateOrProvince": "AR",

                "PostalCode": "12345",

                "Country": ""

            },

            "ShippingAddress": {

                "Address1": "123 Oak Street ",

                "Address2": "",

                "City": " Knoxville ",

                "StateOrProvince": "AR",

                "PostalCode": "12345",

                "Country": ""

            }

        }

    }]

}

Create a New Customer Order

This endpoint creates a customer order.

 

HTTP Request

POST http://dev.visualetailplus.com/orders

<%

  try

   Dim ThreadResponse = " "

   Dim JSON = " { "

json += "          ""OrderID"": ""105"","

json +="           ""TRSDate"": ""6/9/2006"","

json +="           ""TRSTime"": ""5:44:24 PM"","

json +="           ""TaxAmt"": ""27.95"","

json +="            ""LineItems"": ["

json +="                    {"

json +="                        ""Amount"": ""265.00"","

json +="                        ""Discount"": ""106.00"","

json +="                        ""LineTax"": ""27.95"","

json +="                        ""Quantity"": ""1.00"","

json +="                        ""UPC"": ""Ticket1"","

json +="                        },"

json +="                    {"

json +="                        ""Amount"": ""275.00"","

json +="                        ""Discount"": ""110.00"","

json +="                        ""LineTax"": ""1.00"","

json +="                        ""Quantity"": ""1.00"","

json +="                        ""UPC"": ""Ticket2"","                 

json +="                    }"

json +="                ],"

json +="            ""Payments"": ["

json +="                {"

json +="                    ""PaymentAmount"": ""351.9500"","

json +="                   ""PaymentType"": ""M"""

json +="                }"

json +="            ],"

json +="            ""Customer"" : {"

json +="                ""FirstName"":""John"","

json +="                ""LastName"":""Doe"","

json +="                ""EmailAddress"":""email@domain.com"","

json +="                ""BillingAddress"":{"

json +="                    ""Address1"":""1 New  Street"","

json +="                    ""Address2"":""Suite 400"","

json +="                    ""City"":""Hackensack"","

json +="                    ""StateOrProvince"":""NJ"","

json +="                    ""PostalCode"":""07601"","

json +="                    ""Country"":""US"""

json +="                },"

json +="                ""ShippingAddress"":{"

json +="                    ""Address1"":""1 New Street"","

json +="                    ""Address2"":""Suite 400"","

json +="                    ""City"":""Hackensack"","

json +="                    ""StateOrProvince"":""NJ"","

json +="                    ""Zip"":""07601"","

json +="                    ""Country"":""US"""

json +="                }"

json +="            }"

json +="}"

   Dim PathURL As String = "http://dev.visualretailplus.com/orders"

   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")

   Dim rdataStream As System.IO.Stream

   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)

   request.Credentials = SiteCredentials

   request.Method = "POST"

   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)

   Dim  dataStream = rsp.GetResponseStream()

   Dim reader As New System.IO.StreamReader(dataStream)

   ThreadResponse = reader.ReadToEnd()

   reader.Close()

   dataStream.Close()

   response.write(ThreadResponse)

 catch ex as exception

     response.write(ex.message)

 end try

     response.end()

%>

The above command returns JSON structured like this:

 

{

   "StoreID": "01",

   "OrderID": "105",

   "Receiptno": "8850887",

   "TRSDate": "6/9/2006",

   "TRSTime": "1/1/1900 5:44:24 PM",

   "TaxAmt": "0.0000",

   "LineItems":    [

            {

         "Amount": "265.00",

         "Discount": "106.00",

         "LineTax": "1.00",

         "Quantity": "0.00",

         "UPC": "Ticket1"

      },

            {

         "Amount": "275.00",

         "Discount": "110.00",

         "LineTax": "1.00",

         "Quantity": "0.00",

         "UPC": "Ticket2"

      }

   ],

   "Payments": [   {

      "PaymentAmount": "351.9500",

      "PaymentType": "M"

   }],

   "Customer":    {

      "CustomerID": "5052445280101",

      "FirstName": "John",

      "LastName": "Doe",

      "EmailAddress": "email@domain.com",

      "BillingAddress":       {

         "Address1": "1 New Street",

         "Address2": "Suite 400",

         "City": "540 Hudson Street",

         "StateOrProvince": "NJ",

         "PostalCode": "07601",

         "Country": "US"

      }

   }

}